inherited frmInitAcc: TfrmInitAcc
  Left = 464
  Top = 172
  Caption = #20986#32435#24080#25143#21021#22987#21270
  ClientHeight = 422
  ClientWidth = 789
  ExplicitWidth = 797
  ExplicitHeight = 449
  PixelsPerInch = 96
  TextHeight = 12
  inherited pnlBottom: TPanel
    Top = 362
    Width = 789
    TabOrder = 3
    ExplicitTop = 362
    ExplicitWidth = 789
    inherited Bevel1: TBevel
      Top = 4
      Width = 993
      Align = alNone
      Anchors = [akLeft, akRight, akBottom]
      ExplicitTop = 4
      ExplicitWidth = 752
    end
    inherited btnOK: TBitBtn
      Left = 580
      Top = 20
      ExplicitLeft = 580
      ExplicitTop = 20
    end
    inherited btnCancel: TBitBtn
      Left = 680
      Top = 20
      ExplicitLeft = 680
      ExplicitTop = 20
    end
    inherited btnContinue: TBitBtn
      Left = 12
      Top = 20
      Caption = #25805#20316
      Visible = False
      ExplicitLeft = 12
      ExplicitTop = 20
    end
    inherited btnPri: TBitBtn
      Left = 114
      Top = 20
      TabOrder = 6
      Visible = False
      ExplicitLeft = 114
      ExplicitTop = 20
    end
    inherited btnNext: TBitBtn
      Left = 198
      Top = 20
      Visible = False
      ExplicitLeft = 198
      ExplicitTop = 20
    end
    object btnOperator: TcxButton
      Left = 16
      Top = 19
      Width = 75
      Height = 25
      Anchors = [akLeft, akBottom]
      Caption = #21551#29992
      DropDownMenu = pmOperator
      Kind = cxbkDropDownButton
      TabOrder = 5
      OnClick = btnOperatorClick
    end
  end
  object Panel1: TPanel [1]
    Left = 0
    Top = 0
    Width = 789
    Height = 49
    Align = alTop
    BevelOuter = bvNone
    TabOrder = 0
    DesignSize = (
      789
      49)
    object cxLabel1: TcxLabel
      Left = 24
      Top = 16
      Caption = #20986#32435#24080#25143#31867#22411
      Transparent = True
    end
    object cxLabel2: TcxLabel
      Left = 348
      Top = 16
      Caption = #20998#25903#26426#26500
      Transparent = True
    end
    object edtAccType: TcxComboBox
      Left = 112
      Top = 14
      Properties.Items.Strings = (
        #26412#24065#20986#32435#24080#25143
        #22806#24065#20986#32435#24080#25143)
      Properties.OnChange = edtAccTypePropertiesChange
      TabOrder = 0
      Text = #26412#24065#20986#32435#24080#25143
      Width = 121
    end
    object edtFiliale: TcxDBLookupComboBox
      Tag = 5
      Left = 412
      Top = 14
      DataBinding.DataField = 'filid'
      DataBinding.DataSource = dsFiliale
      Properties.ImmediatePost = True
      Properties.ListColumns = <>
      Properties.OnChange = edtAccTypePropertiesChange
      TabOrder = 1
      Width = 145
    end
    object btnExcel: TcxButton
      Left = 898
      Top = 11
      Width = 75
      Height = 25
      Anchors = [akTop, akRight]
      Caption = #23548#20986'Excel'
      OptionsImage.Glyph.SourceDPI = 96
      OptionsImage.Glyph.Data = {
        424D360400000000000036000000280000001000000010000000010020000000
        000000000000C40E0000C40E00000000000000000000FF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FFFF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FFFF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FF000000FF000000FFFF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00000000FF000000FF000000FF000000FF0000
        00FFFF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00000000FF000000FF000000FF000000FF000000FF0000
        00FF000000FFFF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
        FF00FF00FF00848484FF848484FF848484FF848484FF848484FF848484FF8484
        84FF848484FF848484FFFF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FF000000FF000000FF0000
        00FF000000FF000000FF000000FF000000FFFF00FF00FF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FFFF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00000000FFFF00FF00FF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FFFF00FF00840000FF8400
        00FFFF00FF00840000FFFF00FF00000000FFFF00FF00FF00FF00000000FF0000
        00FF000000FF000000FF000000FF000000FF000000FFFF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00000000FFFF00FF00FF00FF00000000FFFF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00840000FFFF0000FF840000FFFF00
        00FF840000FFFF0000FF840000FFFF0000FFFF00FF00FF00FF00000000FFFF00
        FF00840000FFFF00FF00840000FF840000FFFF0000FF840000FFFF0000FF8400
        00FFFF0000FF840000FFFF0000FF840000FFFF00FF00FF00FF00000000FFFF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FFFF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00840000FFFF00
        00FF840000FFFF0000FF840000FFFF0000FF840000FFFF0000FFFF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF0000FF8400
        00FFFF0000FF840000FFFF0000FF840000FFFF0000FF840000FFFF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00}
      TabOrder = 4
      OnClick = btnExcelClick
    end
  end
  object gdInitAcc: TcxGrid [2]
    Left = 0
    Top = 49
    Width = 789
    Height = 313
    Align = alClient
    PopupMenu = pmOperator
    TabOrder = 4
    object ViewInitAcc: TcxGridDBBandedTableView
      PopupMenu = pmOperator
      Navigator.Buttons.CustomButtons = <>
      OnFocusedItemChanged = ViewInitAccFocusedItemChanged
      OnFocusedRecordChanged = ViewInitAccFocusedRecordChanged
      DataController.DataModeController.SmartRefresh = True
      DataController.DataSource = MainDataSource
      DataController.Summary.DefaultGroupSummaryItems = <>
      DataController.Summary.FooterSummaryItems = <
        item
          Kind = skSum
          FieldName = 'fbmbala'
          Column = ViewInitAcccyinitbal
        end
        item
          Kind = skSum
          FieldName = 'bmbala'
          Column = ViewInitAcclocalcyinitbal
        end
        item
          Kind = skSum
          FieldName = 'fbysumdebit'
          Column = ViewInitAcccydebit
        end
        item
          Kind = skSum
          FieldName = 'bysumdebit'
          Column = ViewInitAcclocalcydebit
        end
        item
          Kind = skSum
          FieldName = 'fbysumcredit'
          Column = ViewInitAcccycredit
        end
        item
          Kind = skSum
          FieldName = 'bysumcredit'
          Column = ViewInitAcclocalcycredit
        end
        item
          Kind = skSum
          FieldName = 'foreignbala'
          Column = ViewInitAccbalance
        end
        item
          Kind = skSum
          FieldName = 'standardbala'
          Column = ViewInitAcclocalbalance
        end
        item
          Kind = skCount
          Column = ViewInitAccCode
        end>
      DataController.Summary.SummaryGroups = <>
      OptionsBehavior.FocusCellOnTab = True
      OptionsBehavior.FocusCellOnCycle = True
      OptionsData.CancelOnExit = False
      OptionsData.Deleting = False
      OptionsData.DeletingConfirmation = False
      OptionsData.Inserting = False
      OptionsView.ColumnAutoWidth = True
      OptionsView.Footer = True
      OptionsView.FooterMultiSummaries = True
      OptionsView.GroupByBox = False
      OptionsView.GroupFooterMultiSummaries = True
      OptionsView.GroupFooters = gfAlwaysVisible
      OptionsView.Indicator = True
      OptionsView.IndicatorWidth = 25
      Styles.Background = MainDM.bslBackGroup
      Styles.ContentEven = MainDM.bsEven
      Styles.ContentOdd = MainDM.bsOdd
      Styles.Footer = MainDM.bsTitle
      Styles.Header = MainDM.bsTitle
      Styles.Selection = MainDM.bsSelect
      Styles.BandHeader = MainDM.bsTitle
      OnCustomDrawIndicatorCell = ViewInitAccCustomDrawIndicatorCell
      Bands = <
        item
          Width = 130
        end
        item
        end
        item
        end
        item
          Caption = #26412#24180#24180#21021
          Width = 101
        end
        item
          Caption = #26412#24180#32047#35745#20511#26041
          Width = 104
        end
        item
          Caption = #26412#24180#32047#35745#36151#26041
          Width = 103
        end
        item
          Caption = #26399#21021#20313#39069
          Width = 114
        end
        item
          Visible = False
        end>
      object ViewInitAccCode: TcxGridDBBandedColumn
        Caption = #32534#30721
        DataBinding.FieldName = 'Code'
        Options.Editing = False
        Width = 60
        Position.BandIndex = 0
        Position.ColIndex = 0
        Position.RowIndex = 0
      end
      object ViewInitAccAccID: TcxGridDBBandedColumn
        Caption = #20986#32435#24080#25143
        DataBinding.FieldName = 'accountid'
        Options.Editing = False
        Options.Focusing = False
        Width = 70
        Position.BandIndex = 0
        Position.ColIndex = 1
        Position.RowIndex = 0
      end
      object ViewInitAccYear: TcxGridDBBandedColumn
        Caption = #24180#20221
        DataBinding.FieldName = 'year'
        Position.BandIndex = 1
        Position.ColIndex = 0
        Position.RowIndex = 0
      end
      object ViewInitAccMonth: TcxGridDBBandedColumn
        Caption = #26376#20221
        DataBinding.FieldName = 'month'
        Position.BandIndex = 2
        Position.ColIndex = 0
        Position.RowIndex = 0
      end
      object ViewInitAcccyinitbal: TcxGridDBBandedColumn
        Caption = #22806#24065
        DataBinding.FieldName = 'fbmbala'
        Position.BandIndex = 3
        Position.ColIndex = 0
        Position.RowIndex = 0
      end
      object ViewInitAcclocalcyinitbal: TcxGridDBBandedColumn
        Caption = #26412#24065
        DataBinding.FieldName = 'bmbala'
        Position.BandIndex = 3
        Position.ColIndex = 1
        Position.RowIndex = 0
      end
      object ViewInitAcccydebit: TcxGridDBBandedColumn
        Caption = #22806#24065
        DataBinding.FieldName = 'fbysumdebit'
        Position.BandIndex = 4
        Position.ColIndex = 0
        Position.RowIndex = 0
      end
      object ViewInitAcclocalcydebit: TcxGridDBBandedColumn
        Caption = #26412#24065
        DataBinding.FieldName = 'bysumdebit'
        Position.BandIndex = 4
        Position.ColIndex = 1
        Position.RowIndex = 0
      end
      object ViewInitAcccycredit: TcxGridDBBandedColumn
        Caption = #22806#24065
        DataBinding.FieldName = 'fbysumcredit'
        Position.BandIndex = 5
        Position.ColIndex = 0
        Position.RowIndex = 0
      end
      object ViewInitAcclocalcycredit: TcxGridDBBandedColumn
        Caption = #26412#24065
        DataBinding.FieldName = 'bysumcredit'
        Position.BandIndex = 5
        Position.ColIndex = 1
        Position.RowIndex = 0
      end
      object ViewInitAccbalance: TcxGridDBBandedColumn
        Caption = #22806#24065
        DataBinding.FieldName = 'foreignbala'
        Position.BandIndex = 6
        Position.ColIndex = 0
        Position.RowIndex = 0
      end
      object ViewInitAcclocalbalance: TcxGridDBBandedColumn
        Caption = #26412#24065
        DataBinding.FieldName = 'standardbala'
        Position.BandIndex = 6
        Position.ColIndex = 1
        Position.RowIndex = 0
      end
      object ViewInitAccstart: TcxGridDBBandedColumn
        DataBinding.FieldName = 'start'
        Visible = False
        Options.Editing = False
        Position.BandIndex = 7
        Position.ColIndex = 0
        Position.RowIndex = 0
      end
    end
    object LevelInitAcc: TcxGridLevel
      GridView = ViewInitAcc
    end
  end
  inherited MainDataSource: TDataSource
    DataSet = qryMainData
    Left = 142
    Top = 99
  end
  inherited qryDynDtl: TUniQuery
    Left = 80
    Top = 132
  end
  object cdsFiliale: TClientDataSet
    Aggregates = <>
    Params = <>
    Left = 500
    Top = 8
    object cdsFilialefilid: TIntegerField
      FieldName = 'filid'
    end
  end
  object dsFiliale: TDataSource
    DataSet = cdsFiliale
    Left = 552
    Top = 4
  end
  object qryMainData: TUniQuery
    SQLInsert.Strings = (
      'INSERT INTO tft_mscash'
      
        '  (accountid, nyear, nmonth, filid, moneyid, bmbala, bysumdebit,' +
        ' bysumcredit, tmsumdebit, tmsumcredit, tmsum, fbmbala, fbysumdeb' +
        'it, fbysumcredit, ftmsumdebit, ftmsumcredit, ftmsum, isinit, sta' +
        'ndardbala, foreignbala, odata)'
      'VALUES'
      
        '  (:accountid, :nyear, :nmonth, :filid, :moneyid, :bmbala, :bysu' +
        'mdebit, :bysumcredit, :tmsumdebit, :tmsumcredit, :tmsum, :fbmbal' +
        'a, :fbysumdebit, :fbysumcredit, :ftmsumdebit, :ftmsumcredit, :ft' +
        'msum, :isinit, :standardbala, :foreignbala, :odata)')
    SQLDelete.Strings = (
      'DELETE FROM tft_mscash'
      'WHERE'
      
        '  accountid = :Old_accountid AND nyear = :Old_nyear AND nmonth =' +
        ' :Old_nmonth AND filid = :Old_filid AND moneyid = :Old_moneyid')
    SQLUpdate.Strings = (
      'UPDATE tft_mscash'
      'SET'
      
        '  accountid = :accountid, nyear = :nyear, nmonth = :nmonth, fili' +
        'd = :filid, moneyid = :moneyid, bmbala = :bmbala, bysumdebit = :' +
        'bysumdebit, bysumcredit = :bysumcredit, tmsumdebit = :tmsumdebit' +
        ', tmsumcredit = :tmsumcredit, tmsum = :tmsum, fbmbala = :fbmbala' +
        ', fbysumdebit = :fbysumdebit, fbysumcredit = :fbysumcredit, ftms' +
        'umdebit = :ftmsumdebit, ftmsumcredit = :ftmsumcredit, ftmsum = :' +
        'ftmsum, isinit = :isinit, standardbala = :standardbala, foreignb' +
        'ala = :foreignbala, odata = :odata'
      'WHERE'
      
        '  accountid = :Old_accountid AND nyear = :Old_nyear AND nmonth =' +
        ' :Old_nmonth AND filid = :Old_filid AND moneyid = :Old_moneyid'
      ''
      
        'update td_accountsetacc set balinit=isnull(:foreignbala,0), dcba' +
        'linit=isnull(:standardbala,0)'
      
        '  ,balance=isnull(balance,0)+isnull(:foreignbala,0)-isnull(:Old_' +
        'foreignbala,0)'
      
        '  ,dcbalance=isnull(dcbalance,0)+isnull(:standardbala,0)-isnull(' +
        ':Old_standardbala,0)'
      '  where accountid=:Old_accountid and moneyid=:Old_moneyid')
    SQLLock.Strings = (
      'SELECT * FROM tft_mscash'
      'WITH (UPDLOCK, ROWLOCK, HOLDLOCK)'
      'WHERE'
      
        '  accountid = :Old_accountid AND nyear = :Old_nyear AND nmonth =' +
        ' :Old_nmonth AND filid = :Old_filid AND moneyid = :Old_moneyid')
    SQLRefresh.Strings = (
      
        'SELECT accountid, nyear, nmonth, filid, moneyid, bmbala, bysumde' +
        'bit, bysumcredit, tmsumdebit, tmsumcredit, tmsum, fbmbala, fbysu' +
        'mdebit, fbysumcredit, ftmsumdebit, ftmsumcredit, ftmsum, isinit,' +
        ' standardbala, foreignbala, odata FROM tft_mscash'
      'WHERE'
      
        '  accountid = :Old_accountid AND nyear = :Old_nyear AND nmonth =' +
        ' :Old_nmonth AND filid = :Old_filid AND moneyid = :Old_moneyid')
    Connection = MainDM.UniConn
    SQL.Strings = (
      
        'select m.*,a.start,a.name,a.code from tft_mscash m,td_account a ' +
        'where m.accountid=a.accid and isinit=1')
    CachedUpdates = True
    Options.SetFieldsReadOnly = False
    Options.RequiredFields = False
    Options.QueryRecCount = True
    AfterScroll = qryMainDataAfterScroll
    Left = 140
    Top = 160
    object qryMainDataaccountid: TIntegerField
      FieldName = 'accountid'
    end
    object qryMainDatanyear: TIntegerField
      FieldName = 'nyear'
    end
    object qryMainDatanmonth: TIntegerField
      FieldName = 'nmonth'
    end
    object qryMainDatafilid: TIntegerField
      FieldName = 'filid'
    end
    object qryMainDatamoneyid: TIntegerField
      FieldName = 'moneyid'
    end
    object qryMainDatabmbala: TFloatField
      FieldName = 'bmbala'
    end
    object qryMainDatabysumdebit: TFloatField
      FieldName = 'bysumdebit'
    end
    object qryMainDatabysumcredit: TFloatField
      FieldName = 'bysumcredit'
    end
    object qryMainDatatmsumdebit: TFloatField
      FieldName = 'tmsumdebit'
    end
    object qryMainDatatmsumcredit: TFloatField
      FieldName = 'tmsumcredit'
    end
    object qryMainDatatmsum: TFloatField
      FieldName = 'tmsum'
    end
    object qryMainDatafbmbala: TFloatField
      FieldName = 'fbmbala'
    end
    object qryMainDatafbysumdebit: TFloatField
      FieldName = 'fbysumdebit'
    end
    object qryMainDatafbysumcredit: TFloatField
      FieldName = 'fbysumcredit'
    end
    object qryMainDataftmsumdebit: TFloatField
      FieldName = 'ftmsumdebit'
    end
    object qryMainDataftmsumcredit: TFloatField
      FieldName = 'ftmsumcredit'
    end
    object qryMainDataftmsum: TFloatField
      FieldName = 'ftmsum'
    end
    object qryMainDataisinit: TBooleanField
      FieldName = 'isinit'
    end
    object qryMainDatastandardbala: TFloatField
      FieldName = 'standardbala'
    end
    object qryMainDataforeignbala: TFloatField
      FieldName = 'foreignbala'
    end
    object qryMainDataodata: TIntegerField
      FieldName = 'odata'
    end
    object qryMainDatastart: TBooleanField
      FieldName = 'start'
    end
    object qryMainDataname: TWideStringField
      FieldName = 'name'
      Size = 60
    end
    object qryMainDatayear: TIntegerField
      FieldName = 'year'
    end
    object qryMainDatamonth: TIntegerField
      FieldName = 'month'
    end
    object qryMainDatacode: TWideStringField
      FieldName = 'code'
      Size = 40
    end
  end
  object pmOperator: TPopupMenu
    Left = 40
    Top = 344
    object muStartupAll: TMenuItem
      Caption = #21551#29992#20840#37096#24080#25143
      OnClick = muStartupAllClick
    end
    object muStartupCurr: TMenuItem
      Caption = #21551#29992#24403#21069#24080#25143
      OnClick = muStartupCurrClick
    end
    object N1: TMenuItem
      Caption = '-'
    end
    object muUnStartupAll: TMenuItem
      Caption = #21453#21551#29992#20840#37096#24080#25143
      OnClick = muUnStartupAllClick
    end
    object muUnStartupCurr: TMenuItem
      Caption = #21453#21551#29992#24403#21069#24080#25143
      OnClick = muUnStartupCurrClick
    end
  end
  object dlgSaveExportExcel: TSaveDialog
    Filter = 'Excel|.xls'
    Left = 625
    Top = 5
  end
end
